package com.example.foods.service.impl;

import com.example.foods.data.TagMapper;
import com.example.foods.entity.Tag;
import com.example.foods.service.TagService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class TagServiceImpl implements TagService {

    @Resource
    private TagMapper tagMapper;

    @Transactional(readOnly = true)
    @Override
    public List<Tag> findAllTags() {
        return this.tagMapper.findAllTags();
    }
}
